# 定义函数
def num_factorial(input_number):
    if input_number == 1:
        return 1
    else:
        return input_number * num_factorial(input_number-1)
    
# 调用函数,并打印结果
input_number = int(input("请输入一个数字"))
result = num_factorial(input_number)
print(result)